package com.modxiageasyh.constraintlayoutldemo

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.fragment.findNavController
import kotlinx.android.synthetic.main.activity_constraint_layout.*

class ConstraintLayoutActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_constraint_layout)
        toolbar.setNavigationOnClickListener {
            if (!clNavHostFragment.findNavController().popBackStack()) finish()
        }
    }

    companion object{
        private const val TAG= "ConstraintLayoutActivity"
    }
}